<template>
  <div>
    <button @click="numChange(-1)">-</button>
    <input type="text" :value="value" @input="numInput" />
    <button @click="numChange(1)">+</button>
    <br />
    <slot> </slot>
    <hr />
    <slot name="check"> </slot>
  </div>
</template>

<script>
export default {
  props: ["value"],
  methods: {
    numChange(num) {
      this.$emit("input", this.value + num - 0);
    },
    numInput(e) {
      this.$emit("input", e.target.value - 0);
    },
  },
};
</script>

<style>
</style>